package com.hzit.bj1804.dianweb.service;

import com.github.pagehelper.PageInfo;
import com.hzit.bj1804.dian.entity.Diaryinfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "USER-CLIENT",fallback = DiaryinfoServiceImpl.class)
public interface DiaryService {
    /**
     * 查询所有登陆日志
     */
    @RequestMapping("dseleAll")
    List<Diaryinfo> seleAll();
    /**
     * 根据分页查询所有登陆日志
     */
    @RequestMapping("dseleAllPage")
    PageInfo<Diaryinfo> seleAllPage(@RequestParam("limit") int limit, @RequestParam("page") int page);

    /**
     * 添加登陆日志
     */
    @RequestMapping("dinsert")
    int insert(@RequestBody Diaryinfo diaryinfo);
}
